Skip to main content

dropboxShareFolder

Type

command

Summary

Share a folder with collaborators.

Syntax

dropboxShareFolder <pAccessToken>, <pPath>, <pMemberPolicy>, <pAclUpdatePolicy>, <pSharedLinkPolicy>, <pForceAsync>, [<pCallback>]

Description

Most sharing will be completed synchronously. Large folders will be completed asynchronously. To make testing the async case repeatable, set ShareFolderArg.force_async. If a ShareFolderLaunch.async_job_id is returned, you'll need to call check_share_job_status until the action completes to get the metadata for the folder. Apps must have full Dropbox access to use this endpoint.

If the callback parameter is not empty the request will be asynchronus and when complete the callback will be sent to the object that accessed the API. The callback will be sent with three parameters:

  • The request ID which will be the value of the it variable after calling the command
  • The HTTP response code
  • The data returned which will be the same data as documented for the it variable in a synchronous request.

Parameters

NameTypeDescription

pAccessToken

An OAuth2 Access token to access the user's account

pPath

The path to the folder to share. If it does not exist, then a new one is created.

pMemberPolicy

Who can be a member of this shared folder. Only applicable if the current user is on a team. The default for this union is anyone.

  • "anyone": Anyone can become a member.
  • "team": Only a teammate can become a member.

pAclUpdatePolicy

Who can add and remove members of this shared folder. The default for this union is owner. Policy governing who can change a shared folder's access control list (ACL). In other words, who can add, remove, or change the privileges of members. The value will be one of the following datatypes. New values may be introduced as our API evolves.

  • "owner": Only the owner can update the ACL.
  • "editors": Any editor can update the ACL. This may be further restricted to editors on the same team.

pSharedLinkPolicy

The policy to apply to shared links created for content inside this shared folder. The current user must be on a team to set this policy to SharedLinkPolicy.members. The default for this union is anyone. Policy governing who can view shared links. The value will be one of the following datatypes. New values may be introduced as our API evolves.

  • "anyone": Links can be shared with anyone.
  • "members": Links can only be shared among members of the shared folder.

pForceAsync

Whether to force the share to happen asynchronously. The default for this field is False.

pCallback

The handler to call when the request is complete. If empty the command will block until complete.